<template>
	<view class="wrap">
		<view>自学成才</view>
		<view>
			<problem-list :title="problemItem"></problem-list>
			{{result}}
			<u-button type="primary" @click="getResult">获取正确答案</u-button>
		</view>
	</view>
</template>

<script>
	import problemList from "../../components/problemList.vue"
	export default {
		data() {
			return {
				result: "",
				problemItem: {
					title: "1",
					isAnswer: false,
					descriptor: "A or B or C",
					radio: true,
					candicated: [{
						name: "A",
						checked: false
					}, {
						name: "B",
						checked: false
					}, {
						name: "C",
						checked: false
					}, ],
					answer: "A",
					studentanser: ""
				},
				current: 0,
				list: [],
			}
		},
		methods: {
			dh() {
				uni.navigateTo({
					url: '/components/problemList',
				})
			},
			getResult() {
				this.result = this.problemItem.answer;
			}
		},
		components: {
			problemList
		}
	}
</script>

<style>
</style>
